<div class="section-title">请填写业绩</div>
<ul id="x-money-add-form" class="bui-list">
	
	<li class="bui-btn bui-box clearactive">
		<label class="bui-label" for="user">手机号码</label>
		<div class="span1">
			<div class="bui-input">
				<input id="money" type="number" placeholder="请输入金额" />
			</div>
		</div>
	</li>
	
	<li class="bui-btn bui-box clearactive">
		<label class="bui-label" for="user">日期</label>
        <input type="text" id="x-money-datepicker-input" readonly="readonly" class="bui-input dt" />
	</li>
	
</ul>
<div class="container-xy">
  <div class="bui-btn round primary x-money-add-btn">确认添加</div>
</div>

<script>

	var input = $("#x-money-datepicker-input");
	var uiPickerdate = bui.pickerdate({
			handle:"#x-money-datepicker-input",
			// input 显示的日期格式
			// formatValue: "yyyy-MM-dd hh:mm",
			onChange: function(value) {
					input.val(value);
			}
			// 如果不需要按钮,设置为空
			// buttons: null
	});
	
	$('.x-money-add-btn').click(function(e){
		var money = $('#x-money-add-form #money').val();
		var date = $('#x-money-add-form .dt').val();
		$.ajax({
			type:'post',
			url:'/money',
			data:{
				money:money,
				odate:date
			},
			success:function(r){
				bui.alert('添加成功',function(){
					bui.back();
				});
			}
		}); 
	});
	
</script>